package org.yypm;

/**
 * @author 云烟飘渺o
 * @version 1.0
 * @description 借巨人之力，加速你的成长之路
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.getConnection(), configuration.getMapperElements());
    }
}
